package cn.iocoder.yudao.module.pi.dal.mysql.deploy;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pi.controller.admin.pipline.deploy.vo.DeployPageReqVO;
import cn.iocoder.yudao.module.pi.dal.dataobject.deploy.DeployDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 部署 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface DeployMapper extends BaseMapperX<DeployDO> {

    default PageResult<DeployDO> selectPage(DeployPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DeployDO>()
                .eqIfPresent(DeployDO::getInfo, reqVO.getInfo())
                .eqIfPresent(DeployDO::getData, reqVO.getData())
                .betweenIfPresent(DeployDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DeployDO::getId));
    }

}